pub mod ref_t {
    use web_sys::Element;
    use yew::prelude::*;

    pub struct Comp {
        node_ref: NodeRef,
    }

    impl Component for Comp {
        type Message = ();

        type Properties = ();

        fn create(_ctx: &Context<Self>) -> Self {
            Self { 
                node_ref: NodeRef::default(),
            }
        }

        fn view(&self, _ctx: &Context<Self>) -> Html {
            html! {
                <div ref={self.node_ref.clone()}></div>
            }
        }

        fn rendered(&mut self, _ctx: &Context<Self>,_first_render: bool) {
            let has_attributes = self.node_ref
            .cast::<Element>()
            .unwrap()
            .has_attributes();
        }
    }
}